﻿@model MVCNHibernate.Models.EmployeeModel
@{
    ViewBag.Title = "Employee";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@using (Html.BeginForm("Employee", "Employee", FormMethod.Post, new { id = "frmEmployee" }))
{
    
    
    <div style="width: 600px">
        @if (!string.IsNullOrWhiteSpace(Model.SuccessMsg))
        {
            <section class="success-wrap" id="success-wrap-roleCont">
		                    <h5><span>
                                @Html.Label(Model.SuccessMsg)
                            </span></h5>
	                    </section>
        }
        <!-- Error Message -->
        @if (!string.IsNullOrWhiteSpace(Model.ErrMsg))
        {
            <section class="error-wrap" id="error-wrap-roleCont">
                        <ul>                            
                            @Html.Label(Model.ErrMsg)
                            @Html.ValidationSummary()
                        </ul>
                        </section>                                
        }
    </div> 
                   
    <div class="row">
        <div class="cell-left">
            @Html.LabelFor(model => model.EmpName)
        </div>
        <div class="cell-right">
            @Html.TextBoxFor(model => model.EmpName, new {ID="txtName", width = "90px", tabindex = 1 })
        </div>
    </div>
    <div class="row">
        <div class="cell-left">
            @Html.LabelFor(model => model.Address)
        </div>
        <div class="cell-right">
            @Html.TextAreaFor(model => model.Address, new { ID = "txtAddr", width = "90px", tabindex = 2, Class = "address-area" })
        </div>
    </div>
    <div class="row">
         <div class="cell-left"></div>
         <div class="cell-right">
            @Html.DropDownListFor(model => model.SelectedDeptId, new[]
            {
                new SelectListItem {Text="IT", Value="1", Selected=true},
                new SelectListItem {Text="HR", Value="2"},
                                                            
            }, new { @ID = "ddlDept", tabindex = 3})
        </div>
    </div>
    <div class="row">
        <div class="cell-right">
            <input type="button" id="btnSave" value="Save" class="blueButton"/>
            <input type="reset" value="Reset" class="blueButton"/>
        </div>
    </div>

    @Html.HiddenFor(model => model.btnClicked, new { id = "hdnBtn", name = "hdnBtn" })
    <div>
    <div class="verticalSpace"></div>
    <div class="data-table">
        <table id="employeeTable" cellpadding="0" cellspacing="0" >
            <thead>
                <tr>                                
                    <th style="width: 140px !important; text-align:left">Id</th>
                    <th style="width: 340px !important; text-align:left">Name</th>
                    <th style="width: 540px !important; text-align:left">Address</th>
                </tr>
            </thead>
            <tbody>
            </tbody>
        </table>
    </div>
</div>


}
